import django_filters
from django_filters import rest_framework as filters
from connect.models import QueryDatabase, RunSqlTask


class RunSqlTaskFilter(filters.FilterSet):
    t_taskid = django_filters.CharFilter(field_name="t_taskid", lookup_expr="icontains")
    t_status = django_filters.CharFilter(field_name="t_status", lookup_expr="icontains")

    class Meta:
        model = RunSqlTask
        fields = [
            't_taskid',
            't_status',
        ]
